/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package vn.khanhhoi;

import java.util.Iterator;
import java.util.List;
import vn.khanhhoi.persistent.models.IPlugin;

/**
 *
 * @author Long
 */
public class RenderMenu {

    public String Render(List<IPlugin> plugins) {

        String menu = "";
        for (IPlugin item : plugins) {
            if (item.CusView() != null && !"".equals(item.CusView())) {
                menu = menu + "<li><a data-cview=\"" + item.CusView() + "\" data-scroll data-options=\"easing: linear\" href=\"#main-content\" data-value=\"" + item.PluginName() + "\">" + item.PresentationName() + "</a></li>";
            } else {
                menu = menu + "<li><a data-scroll data-options=\"easing: linear\" href=\"#main-content\" data-value=\"" + item.PluginName() + "\">" + item.PresentationName() + "</a></li>";
            }
        }
        return menu;
    }
}
